import 'package:flutter/material.dart';

class ExpandedComps extends StatelessWidget {
  const ExpandedComps({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      decoration: const BoxDecoration(
        color: Colors.red,
      ),
      alignment: Alignment.topLeft,
      child: Container(
          width: double.infinity,
          height: 120,
          padding: const EdgeInsets.all(10),
          decoration: const BoxDecoration(
            color: Colors.pink,
          ),
          child: Row(
            children: [
              // 左侧图片
              ClipRRect(
                borderRadius: BorderRadius.circular(10),
                child: Image.network(
                    'https://img2.baidu.com/it/u=1666858871,666753767&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=962'),
              ),
              const SizedBox(width: 10),
              // 右侧内容
              Expanded(
                  flex: 1,
                  child: ClipRRect(
                      borderRadius: BorderRadius.circular(10),
                      child: Container(
                        decoration: const BoxDecoration(
                          color: Colors.purple,
                        ),
                        child: const Column(
                          children: [
                            Text('主标题,主标题主标题,主标题, 主标题,主标题主标题,主标题'),
                            Expanded(
                              flex: 1,
                              child: Text(
                                  '内容, 内容内容内容内容内容,内容, 内容内容内容内容内容内容, 内容内容内容内容内容'),
                            ),
                          ],
                        ),
                      )))
            ],
          )),
    );
  }
}
